﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using University.Workshop.Model;
using University.Workshop.Business;



namespace University.Workshop.Presenters.AppointmentFolder
{
  public class PresenterUpdateAppointmentDate
    {
       IUpdateAppointmentDate view;

        public PresenterUpdateAppointmentDate(IUpdateAppointmentDate view)
        {
            this.view = view;
        }

        public string UpdateAppointmentDate()
        {
            try
            {
                AppointmentManager.ModifyAppointment(view.Apo);
            }
            catch (FormatException ex)
            {
                return ex.Message;
            }
            return "La fecha ha sido modificada con exito";
        }
        public static bool Cleaner(string message)
        {
            if (PatientManager.CleanSpaces(message))
            {
                return true;
            }
            else
            {
                return false;
            }


        }
    }
}
